Class Layer
- java.lang.Object
- 
- com.supermap.mapping.Layer
 
- 
- Direct Known Subclasses:
- LayerGridAggregation, LayerGroup, LayerHeatmap
 
 
 public class Layer extends java.lang.Object
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description LayerSettinggetAdditionalSetting()Returns the style setting of a common layer.LayergetByCaption(java.lang.String caption)Gets the layer for the specified aliasjava.lang.StringgetCaption()Returns the caption of this layer.GeoRegiongetClipRegion()Return to the cropping area of the layer.DatasetgetDataset()Returns the dataset object of this layer.intgetDeduplicateThreshold()Gets the rarefied threshold value.doublegetDeduplicateTolerance()Gets the rarefied tolerance.java.lang.StringgetDescription()Returns the description of a layer.QueryParametergetDisplayFilter()Returns the specified filter condition for the layer display.booleangetIsSwipe()获取图层是否使用卷帘效果GeoRegiongetLabelDisplayArea()获取标签显示范围LayerSettingVectorCachegetLayerSettingVectorCache()获取矢量图层设置风格intgetLayerWeight()获取图层权重doublegetMaxVisibleScale()Returns the maximum visible scale of this layer.doublegetMinVisibleGeometrySize()Returns the minimum display size of the geometry object, with the geometric object Bounds wide and the maximum heightdoublegetMinVisibleScale()Returns the minimum visible scale of this Layer.java.lang.StringgetName()Returns the name of the layer.LayerGroupgetParentGroup()Gets the group layer the layer belongs to.SelectiongetSelection()Returns the selection object of this layer.doublegetSymbolScale()Return the display scale of symbols.ThemegetTheme()Gets the thematic objects of the thematic layer.ThemeGetTheme()Deprecated.java.lang.StringgetTimeEndField()The temporal data must have time attributes to represent the observed starting time and ending time.java.util.DategetTimeFilterEnding()Returns the ending time of the filter expression of the layer time.java.util.DategetTimeFilterStarting()Returns the starting time of the filter expression of the layer time.java.lang.StringgetTimeStartField()The temporal data must have time attributes to represent the observed starting time and ending time.TimeSpangetTimeStepInterval()Returns the time step interval of the temporal dataintgetWebTileMaxLevel()Get the network data set, the maximum tile display levelSelectionhitTest(Point2D pt, double tolerance)Returns the selected objects.SelectionhitTestEx(Point pt, int tolerance)Returns the selected objects.booleanisClipRegionEnabled()Returns whether the cropping area is valid.java.lang.BooleanisDeduplicateEnabled()Gets whether to rarefybooleanisDisposed()Returns whether the object is disposed.booleanisEditable()Returns a value indicating whether this layer is editable.java.lang.BooleanisFastDrawEnabled()Get whether to draw a fast pattern, default no, this mode is used for large data volume layer browsing and scaling. This mode is not recommended for small data volume and editing maps.booleanisLabelDisplayAreaEnable()Get whether the label is displayed in scope.booleanisSelectable()Returns whether the objects in the specified layer are selectable.booleanisSnapable()Get if the layer is catchable.booleanisSymbolScalable()Returns whether to allow scaling symbols with layer zoom.booleanIsTimeFilterEnable()Returns whether to enable the time filter of the layer .booleanisVisible()Returns whether this layer is visible.booleanisVisibleScale(double dScale)Returns a value indicating whether the specified scale is a visible scale.voidremoveCache()Clear the current display cache and refresh againvoidsetAdditionalSetting(LayerSetting layerSetting)Sets the style setting of a common layer.voidsetCaption(java.lang.String value)Set the title of the layer.voidsetClipRegion(GeoRegion geoRegion)Set the crop area of the layer.voidsetClipRegionEnabled(boolean value)Set whether the clipping area is effective.voidsetDataset(Dataset dataset)Sets the dataset associated with the layer.voidsetDeduplicateEnabled(java.lang.Boolean value)Sets whether to rarefyvoidsetDeduplicateThreshold(int value)Sets the rarefied threshold value.voidsetDeduplicateTolerance(double value)Sets the rarefied tolerance.voidsetDescription(java.lang.String value)Sets the description of this layer.voidsetDisplayFilter(QueryParameter queryParameter)Sets the specified filter condition for the layer display.voidsetEditable(boolean value)Sets a value indicating whether this layer is editable.voidsetFastDrawDataModefied(boolean isModefied)When data changes in the quickly drawing mode, call the interface to refresh layer data.voidsetFastDrawEnabled(java.lang.Boolean value)Sets whether to use the quickly drawing mode.voidsetIsSwipe(boolean bSwipe)Sets whether to enable the Swipe featurevoidsetLabelDisplayArea(GeoRegion region)Set the label display rangevoidsetLabelDisplayAreaEnable(boolean value)Set whether the range of labels is displayedvoidsetLayerWeight(int value)Set the layer weight, which is only valid for the label layer, and you need to turn on the top layer display of the labelvoidsetMaxVisibleScale(double value)Returns the maximum visible scale of this layer.voidsetMinVisibleGeometrySize(double value)Set the minimum display size of the geometric object to the geometric object Bounds wide and high the maximum valuevoidsetMinVisibleScale(double value)Sets the minimum visible scale of this Layer.voidsetOpaqueRate(int value)Sets the opacity of the layer.voidsetSelectable(boolean value)Sets whether the objects in the specified layer are selectable.voidsetSnapable(boolean value)Set whether the layer can be captured.voidsetSymbolScalable(boolean value)Sets whether to allow scaling symbols with layer zoom.voidsetSymbolScale(double value)Return the display scale of symbols.voidsetTimeEndField(java.lang.String strField)The temporal data must have time attributes to represent the observed starting time and ending time.voidsetTimeFilterEnable(boolean bEnable)Sets whether to enable the time filter of the layer .voidsetTimeFilterEnding(java.util.Date endTime)Sets the ending time of the filter expression of the layer time.voidsetTimeFilterStarting(java.util.Date startTime)Sets the starting time of the filter expression of the layer time.voidsetTimeStartField(java.lang.String strField)The temporal data must have time attributes to represent the observed starting time and ending time.voidsetTimeStepInterval(TimeSpan timeSpan)Sets the time step interval of the temporal datavoidsetVisible(boolean value)Sets whether this layer is visible.voidsetWebTileMaxLevel(int level)Set the network data set to maximize the tile display level.java.lang.StringtoXML()Turns into XML
 
- 
- 
- 
Method Detail- 
getNamepublic java.lang.String getName() Returns the name of the layer. The name of a layer is the unique identifier of this layer in a map. The identifier is not case-sensitive.- Returns:
- The name of the layer.
 
 - 
toXMLpublic java.lang.String toXML() Turns into XML- Returns:
- String
 
 - 
getCaptionpublic java.lang.String getCaption() Returns the caption of this layer. The caption of the layer is the display name of the layer. For example in a layout or legend, the display name of the layer is actually the caption of the layer. It is different from the name of the layer.- Returns:
- The title of the layer.
 
 - 
setCaptionpublic void setCaption(java.lang.String value) Sets the caption of this layer. The caption of the layer is the display name of the layer. For example in a layout or legend, the display name of the layer is actually the caption of the layer. It is different from the name of the layer.- Parameters:
- value- Specifies the title of the layer.
 
 - 
getDescriptionpublic java.lang.String getDescription() Returns the description of a layer.- Returns:
- The description of this layer.
- Default:
- The default value is an empty string.
 
 - 
setDescriptionpublic void setDescription(java.lang.String value) Sets the description of this layer.- Parameters:
- value- Specifies the description of the layer.
 
 - 
getDatasetpublic Dataset getDataset() Returns the dataset object of this layer. A layer references to a dataset, so a layer corresponds with a dataset.- Returns:
- This layer corresponds to the dataset object.
 
 - 
GetTheme@Deprecated public Theme GetTheme() Deprecated.Gets the thematic objects of the thematic layer.- Returns:
- Theme This layer corresponds to the thematic map object.
 
 - 
getThemepublic Theme getTheme() Gets the thematic objects of the thematic layer.- Returns:
- Theme This layer corresponds to the thematic map object.
 
 - 
getSelectionpublic Selection getSelection() Returns the selection object of this layer. The selection is a collection and it contains one or more features that are selected in a layer. Only the features in the selection can be edited. Note that the selection only work on vector dataset. Grid datasets and image datasets don't have selection.- Returns:
- The selection set object in this layer.
 
 - 
isSelectablepublic boolean isSelectable() Returns whether the objects in the specified layer are selectable.When you need to make some selections or queries on a layer, you need to set the layer to be selectable. When the layer is selectable, you can select the elements of interest, query its related attributes and statistical information. - Returns:
- A Boolean value that indicates whether the object in the layer can be selected, true indicates that the object in this layer can be selected, false indicates that the object in this layer is not selectable.
- Default:
- The default value is true, that is, the objects in the layer can be selected.
 
 - 
setSelectablepublic void setSelectable(boolean value) Sets whether the objects in the specified layer are selectable.true Indicates that the objects in this layer can be selected, false means that the objects in this layer are not selectable. When you need to make some selections or queries on a layer, you need to set the layer to be selectable. When the layer is selectable, you can select the elements of interest, query its related attributes and statistics. - Parameters:
- value- Specifies whether objects in the layer can be selected.
 
 - 
isEditablepublic boolean isEditable() Returns a value indicating whether this layer is editable. This method indicates whether you can edit the data that this layer references.When the layer is editable, it means that the data referenced by the layer can be modified and edited, through the layer, you can visualize the data editing. When you only want to render the data referenced by the layer or do not want to affect the original data, it is recommended that the layer is set to non-editable to avoid inadvertent operation to modify the data. - Returns:
- The layer is editable and returns true; false otherwise.
 
 - 
setEditablepublic void setEditable(boolean value) Sets a value indicating whether this layer is editable. This method indicates whether you can edit the data that this layer references.When the layer is editable, it means that the data referenced by the layer can be modified and edited, through the layer, you can visualize the data editing. When you only want to render the data referenced by the layer or do not want to affect the original data, it is recommended that the layer is set to non-editable to avoid inadvertent operation to modify the data. - Parameters:
- value- Whether the layer is editable.
 
 - 
isSymbolScalablepublic boolean isSymbolScalable() Returns whether to allow scaling symbols with layer zoom.- Returns:
- A Boolean value that indicates whether the symbol size of the layer is scaled with the graph, true, indicating that the symbol size of the layer is scaled with the graph, false, that does not scale with the graph.
- Default:
- The default value is false, that is, the symbol size of the layer can not be scaled.
 
 - 
setSymbolScalablepublic void setSymbolScalable(boolean value) Sets whether to allow scaling symbols with layer zoom.- Parameters:
- value- Specifies whether the symbol size of the layer is scaled with the graph.
 
 - 
isVisiblepublic boolean isVisible() Returns whether this layer is visible. It returns true if this layer is visible; otherwise it returns false.- Returns:
- Whether the layer is visible.
- Default:
- The default value is true. That layer visible.
 
 - 
setVisiblepublic void setVisible(boolean value) Sets whether this layer is visible. It returns true if this layer is visible; otherwise it returns false.- Parameters:
- value- Specifies whether the layer is visible.
 
 - 
getAdditionalSettingpublic LayerSetting getAdditionalSetting() Returns the style setting of a common layer. TheLayerSettingVectorclass is used to set and modify the style of the vector layer.- Returns:
- Normal layer style settings.
 
 - 
getMaxVisibleScalepublic double getMaxVisibleScale() Returns the maximum visible scale of this layer. The maximum visible scale of a layer should not be negative. When current display scale of the map is equal to or larger than the maximum visible scale of this layer, this layer will not be displayed.- Returns:
- The maximum visible scale of the layer.
- Default:
- The default value is 0.
 
 - 
setMaxVisibleScalepublic void setMaxVisibleScale(double value) Returns the maximum visible scale of this layer. The maximum visible scale of a layer should not be negative. When current display scale of the map is equal to or larger than the maximum visible scale of this layer, this layer will not be displayed.- Parameters:
- value- Specifies the maximum visible scale for the layer.
 
 - 
getMinVisibleScalepublic double getMinVisibleScale() Returns the minimum visible scale of this Layer. The minimum visible scale of a layer should not be negative. When current display scale of the map is less than the minimum visible scale of this layer, this layer will not be displayed.- Returns:
- The minimum visible scale of the layer.
- Default:
- The default value is 0.
 
 - 
setAdditionalSettingpublic void setAdditionalSetting(LayerSetting layerSetting) Sets the style setting of a common layer. The style settings for vector data, grid data and image data are different. TheLayerSettingVectorclass is used to set and modify the styles of the vector dataset.- Parameters:
- layerSetting- Normal layer style settings.
 
 - 
setMinVisibleScalepublic void setMinVisibleScale(double value) Sets the minimum visible scale of this Layer. The minimum visible scale of a layer should not be negative. When current display scale of the map is less than the minimum visible scale of this layer, this layer will not be displayed.- Parameters:
- value- Specifies the minimum visible scale for the layer.
 
 - 
getDisplayFilterpublic QueryParameter getDisplayFilter() Returns the specified filter condition for the layer display.- Returns:
- QueryParameter The layer displays the filter criteria.
 
 - 
setDisplayFilterpublic void setDisplayFilter(QueryParameter queryParameter) Sets the specified filter condition for the layer display.- Parameters:
- queryParameter- The layer displays the filter criteria.
 
 - 
hitTestpublic Selection hitTest(Point2D pt, double tolerance) Returns the selected objects. If the distance of the nearest point on the objects from the point to be tested is within the specified tolerance, the object is selected. If the objects that satisfy the condition overlap, they will all be selected and returned.- Parameters:
- pt- To test the point, for the geographic coordinate point.
- tolerance- The specified margin is geographically long.
- Returns:
- The collection of selected objects.
 
 - 
hitTestExpublic Selection hitTestEx(Point pt, int tolerance) Returns the selected objects. If the distance of the nearest point on the objects from the point to be tested is within the specified tolerance, the object is selected. If the objects that satisfy the condition overlap, they will all be selected and returned.- Parameters:
- pt- To test the point for the point on the screen.
- tolerance- Specify the tolerance for the screen coordinates.
- Returns:
- The collection of selected objects.
 
 - 
isVisibleScalepublic boolean isVisibleScale(double dScale) Returns a value indicating whether the specified scale is a visible scale. If the scale is within the minimum visible scale and the maximum visible scale of this layer, the scale is a visible scale.- Parameters:
- dScale- Specified display scale.
- Returns:
- The specified scale returns true for the visual scale; otherwise, false.
 
 - 
isDisposedpublic boolean isDisposed() Returns whether the object is disposed. If this method returns true, implementing the the methods of this class will throw an exception, which means the object has been disposed already.- Returns:
- If the object has been released ,returns true; otherwise it returns false.
 
 - 
getParentGrouppublic LayerGroup getParentGroup() Gets the group layer the layer belongs to.- Returns:
- object belongs to the grouping layer
 
 - 
setDatasetpublic void setDataset(Dataset dataset) Sets the dataset associated with the layer. The dataset should be in the same workspace with the current map and the dataset type should be the same with the type of the original dataset. Otherwise, an exception will occur.- Parameters:
- dataset- Layer-related data sets
 
 - 
setOpaqueRatepublic void setOpaqueRate(int value) Sets the opacity of the layer.- Parameters:
- value- Opacity, 0-100.
 
 - 
removeCachepublic void removeCache() Clear the current display cache and refresh again
 - 
isSnapablepublic boolean isSnapable() Get if the layer is catchable.- Returns:
- boolean Returns whether the layer can be captured, true indicates that the layer can be captured, false indicates that the layer is not catchable.
 
 - 
setSnapablepublic void setSnapable(boolean value) Set whether the layer can be captured.- Parameters:
- value- Whether the layer can be captured, true that the layer can be captured, false that the layer can not be captured.
 
 - 
getMinVisibleGeometrySizepublic double getMinVisibleGeometrySize() Returns the minimum display size of the geometry object, with the geometric object Bounds wide and the maximum height- Returns:
- double Minimum display size
 
 - 
setMinVisibleGeometrySizepublic void setMinVisibleGeometrySize(double value) Set the minimum display size of the geometric object to the geometric object Bounds wide and high the maximum value- Parameters:
- value- Minimum display size
 
 - 
getByCaptionpublic Layer getByCaption(java.lang.String caption) Gets the layer for the specified alias- Parameters:
- caption- Layer alias
- Returns:
- Specifies the layer of the alias
 
 - 
setIsSwipepublic void setIsSwipe(boolean bSwipe) Sets whether to enable the Swipe feature- Parameters:
- bSwipe- whether to enable the Swipe feature. false is by default.
 
 - 
getIsSwipepublic boolean getIsSwipe() Gets whether to enable the Swipe feature- Returns:
- whether to enable the Swipe feature.
 
 - 
getLayerSettingVectorCachepublic LayerSettingVectorCache getLayerSettingVectorCache() Gets the setting style of the vector layer.- Returns:
- Gets the setting style of the vector layer.
 
 - 
getSymbolScalepublic double getSymbolScale() Return the display scale of symbols. If the symbol does not zoom with zooming the map (SymbolScalable = False), the symbol size is Style.symbolsize. If the symbol zooms with zooming the map (SymbolScalable = True), the symbol size relates to the layer scale (generally consistent).- Returns:
- double
 
 - 
setSymbolScalepublic void setSymbolScale(double value) Return the display scale of symbols. If the symbol does not zoom with zooming the map (SymbolScalable =False), the symbol size is Style.symbolsize. If the symbol zooms with zooming the map (SymbolScalable = True), the symbol size relates to the layer scale (generally consistent).- Parameters:
- value- whether the symbol zooms with zooming the map
 
 - 
IsTimeFilterEnablepublic boolean IsTimeFilterEnable() Returns whether to enable the time filter of the layer . True means yes. False is by default.- Parameters:
- -
 
 - 
setTimeFilterEnablepublic void setTimeFilterEnable(boolean bEnable) Sets whether to enable the time filter of the layer . True means yes.- Parameters:
- -
 
 - 
getTimeStartFieldpublic java.lang.String getTimeStartField() The temporal data must have time attributes to represent the observed starting time and ending time. The interface is used for returning the field that records all starting times.- Parameters:
- -
 
 - 
setTimeStartFieldpublic void setTimeStartField(java.lang.String strField) The temporal data must have time attributes to represent the observed starting time and ending time. The interface is used for setting the field that records all starting times.- Parameters:
- -
 
 - 
getTimeEndFieldpublic java.lang.String getTimeEndField() The temporal data must have time attributes to represent the observed starting time and ending time. The interface is used for returning the field that records all ending times.- Parameters:
- -
 
 - 
setTimeEndFieldpublic void setTimeEndField(java.lang.String strField) The temporal data must have time attributes to represent the observed starting time and ending time. The interface is used for setting the field that records all ending times.- Parameters:
- -
 
 - 
getTimeFilterStartingpublic java.util.Date getTimeFilterStarting() Returns the starting time of the filter expression of the layer time.- Parameters:
- -
 
 - 
setTimeFilterStartingpublic void setTimeFilterStarting(java.util.Date startTime) Sets the starting time of the filter expression of the layer time.- Parameters:
- -
 
 - 
getTimeFilterEndingpublic java.util.Date getTimeFilterEnding() Returns the ending time of the filter expression of the layer time.- Parameters:
- -
 
 - 
setTimeFilterEndingpublic void setTimeFilterEnding(java.util.Date endTime) Sets the ending time of the filter expression of the layer time.- Parameters:
- -
 
 - 
getTimeStepIntervalpublic TimeSpan getTimeStepInterval() Returns the time step interval of the temporal data- Parameters:
- -
 
 - 
setTimeStepIntervalpublic void setTimeStepInterval(TimeSpan timeSpan) Sets the time step interval of the temporal data- Parameters:
- -
 
 - 
setDeduplicateEnabledpublic void setDeduplicateEnabled(java.lang.Boolean value) Sets whether to rarefy- Parameters:
- value- Whether to rarefy
 
 - 
isDeduplicateEnabledpublic java.lang.Boolean isDeduplicateEnabled() Gets whether to rarefy- Returns:
- whether to rarefy.
 
 - 
setFastDrawEnabledpublic void setFastDrawEnabled(java.lang.Boolean value) Sets whether to use the quickly drawing mode. No is by default. The mode is used for zooming big data layers.- Parameters:
- value- whether to use the quickly drawing mode
 
 - 
isFastDrawEnabledpublic java.lang.Boolean isFastDrawEnabled() Gets whether to use the quickly drawing mode. No is by default. The mode is used for zooming big data layers.- Returns:
- whether to use the quickly drawing mode
 
 - 
setFastDrawDataModefiedpublic void setFastDrawDataModefied(boolean isModefied) When data changes in the quickly drawing mode, call the interface to refresh layer data. The interface can't work in other modes.- Parameters:
- isModefied- whether data changes
 
 - 
setDeduplicateTolerancepublic void setDeduplicateTolerance(double value) Sets the rarefied tolerance. Unit is pixel.- Parameters:
- value- the rarefied tolerance
 
 - 
getDeduplicateTolerancepublic double getDeduplicateTolerance() Gets the rarefied tolerance. Unit is pixel.- Returns:
- the rarefied tolerance
 
 - 
setDeduplicateThresholdpublic void setDeduplicateThreshold(int value) Sets the rarefied threshold value. Unit is the number of points- Parameters:
- value- the number of points
 
 - 
getDeduplicateThresholdpublic int getDeduplicateThreshold() Get the dilution threshold in the number of points.- Return:
- Count of points
 
 - 
setLabelDisplayAreapublic void setLabelDisplayArea(GeoRegion region) Set the scope of label display- Parameter:
- region-
 
 - 
getLabelDisplayAreapublic GeoRegion getLabelDisplayArea() Get the display range of the label
 - 
setLabelDisplayAreaEnablepublic void setLabelDisplayAreaEnable(boolean value) Set whether the label is displayed in the range- Parameter:
- value-
 
 - 
isLabelDisplayAreaEnablepublic boolean isLabelDisplayAreaEnable() Get the label whether the range is displayed- Return:
 
 - 
setLayerWeightpublic void setLayerWeight(int value) Setting the layer weight is only valid for the label layer. You need to turn on the top display of the label.- Parameter:
- value- int
 
 - 
getLayerWeightpublic int getLayerWeight() Get layer weights- Return:
- Layer Weight Values
 
 - 
setWebTileMaxLevelpublic void setWebTileMaxLevel(int level) Set the network data set to maximize the tile display level. Eg: There are 19 tiles in the vector layer of the sky map, of which level 19 is the blank layer. By setting setWebTileMaxLevel (18), it is possible not to display 19-level tiles, and the magnification map can continue to use 18-level tiles. This function requires turning on Map.setLayerHierarchic(true), which is only valid for WMTS services.- Parameter:
- level-
 
 - 
getWebTileMaxLevelpublic int getWebTileMaxLevel() Get the network data set, the maximum tile display level. Return -1 indicates the default value.- Return:
 
 - 
getClipRegionpublic GeoRegion getClipRegion() Returns the cropping area of the layer.- Return:
- Returns the cropping area of the layer.
 
 - 
setClipRegionpublic void setClipRegion(GeoRegion geoRegion) Set the crop area of the layer.- Parameter:
- geoRegion- The cropping area of the layer.
 
 - 
isClipRegionEnabledpublic boolean isClipRegionEnabled() Returns whether the cropping area is valid.The cropping area displayed by the layer is related to the return value of the following methods: Map.getClipRegion(),Map.isClipRegionEnabled(),Layer.getClipRegion(),Layer.isClipRegionEnabled().- Return:
- A Boolean value that specifies whether the clipping area is valid. True means valid, false means invalid.
 
 - 
setClipRegionEnabledpublic void setClipRegionEnabled(boolean value) Set whether the cropping area is valid.- Parameter:
- value- A Boolean value specifies whether the cropping area is valid, true means valid, and false means invalid.
 
 
- 
 
-